package com.molin.IOtest.propertiesMap;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class Demo1 {
    public static void main(String[] args) {
        Properties properties=new Properties();
        properties.put("key01","value01");
        properties.put("SUV","s");
        properties.put("枪兵","bb");

        properties.remove("key01");

        properties.put("SUV","suv");

        Object suv= properties.get("SUV");

        Set<Object> keys =properties.keySet();
        for (Object key : keys) {
            System.out.println(key+" "+properties.get(key));
        }

        Set<Map.Entry<Object,Object>> entries=properties.entrySet();
        for (Map.Entry<Object, Object> entry : entries) {
            System.out.println(entry.getKey()+" "+entry.getValue());
        }
    }
}
